-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ambiguity for UNSPECIFIED UPayloadFormat #247
Remove ambiguity for UNSPECIFIED UPayloadFormat #247
Conversation
Previously (version 1.3.6 and earlier of the specification) we did not have an enum for the payload format (it was a string) and sending the string was costly to the cloud even though we always knew it was WRAPPED_IN_ANY. To avoid sending the payload format we omitted the attribute and then "assumed" that if it was not present it would be WRAPPED_IN_ANY. Now that we have an enum defined, it is better to remove the ambiguity of this attribute and make it explicit, this means that if someone sets it to UNSPECIFIED it really means unspecified (we don't know or are not setting it to anything). Additionally, for SOME/IP there is no way to pass this attribute (UPayloadFormat) so we have to set UPayloadFormat as UNSPECIFIED and then leave it up to the client to know the format from the source. eclipse-uprotocol#237
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making this change will also require a change to the corresponding specitem revision in the uattributes/umessage specification where we define that the payload format should be assumed to be WRAPPED_IN_ANY if not specified. This will make sure that OFT discovers the discrepancy between spec and implementation...
Co-authored-by: Kai Hudalla <[email protected]>
There is no OFT requirement for this in upayload.adoc or in uattributes.adoc, it will need to be added on a subsequent PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I will create a PR for adding some wording and OFT spec item then ...
LGTM
This is a follow up of eclipse-uprotocol#247
This is a follow up of eclipse-uprotocol#247
* Support UNSPECIFIED payload format in CloudEvents mapping This is a follow up of #247 * Change the type name of uProtocol messages The names defined for the different uProtocol message types have been changed to allow distinguishing between existing CloudEvents being exchanged by legacy systems using a predecessor of Eclipse uProtocol and CloudEvents conforming to the mapping rules defined in the uProtocol specification.
done |
Previously (version 1.3.6 and earlier of the specification) we did not have an enum for the payload format (it was a string) and sending the string was costly to the cloud even though we always knew it was WRAPPED_IN_ANY. To avoid sending the payload format we omitted the attribute and then "assumed" that if it was not present it would be WRAPPED_IN_ANY. Now that we have an enum defined, it is better to remove the ambiguity of this attribute and make it explicit, this means that if someone sets it to UNSPECIFIED it really means unspecified (we don't know or are not setting it to anything). Additionally, for SOME/IP there is no way to pass this attribute (UPayloadFormat) so we have to set UPayloadFormat as UNSPECIFIED and then leave it up to the client to know the format from the source.
#237